﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VERKProjectHopur16.Models.DepEventViewModel>"  %>
<%@ Import Namespace="VERKProjectHopur16.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	AllEvents
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: Lang.GetText("Menu", "Events") %></h2>
    <div id="tabs" class="tabs">
        <ul>
            <li><a href="#fragment-1"><span><%: Lang.GetText("Menu", "All") %></span></a></li>
            <li><a href="#fragment-2"><span><%: Lang.GetText("Menu", "Medicine") %></span></a></li>
            <li><a href="#fragment-3"><span><%: Lang.GetText("Menu", "Psychology")%></span></a></li>
            <li><a href="#fragment-4"><span><%: Lang.GetText("Menu", "Sociology") %></span></a></li>
        </ul>
        <div id="fragment-1">
        <table class="tabcontent">
            <thead>
                <tr>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Event"), "OrderEvent", new { id = 1 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Start_Date"), "OrderEvent", new { id = 2 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "End_Date"), "OrderEvent", new { id = 3 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "OrderEvent", new { id = 4 })%></th>
                    <th><%: Lang.GetText("Menu", "Department") %></th>
               </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.allDept) 
            { %>
            <tr id="eventsAll">            
                <td><%= Html.ActionLink(item.Name, "SingleEvent", new { id = item.EventID })%></td>
                <td><%: item.StartDate.ToString("dddd, dd MMMM yyyy HH:mm")%></td>
                <td><%: item.EndDate %></td>
                <td><%: item.Author.Name %></td>     
                <td><%: Lang.GetText("Menu", item.Department.Name) %></td>
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
        <div id="fragment-2">
        <table class="tabcontent">
            <thead>
                <tr>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Event"), "OrderEvent", new { id = 1 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Start_Date"), "OrderEvent", new { id = 2 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "End_Date"), "OrderEvent", new { id = 3 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "OrderEvent", new { id = 4 })%></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.medDept) 
            { %>
            <tr id="eventsMed">
                <td><%= Html.ActionLink(item.Name, "SingleEvent", new { id = item.EventID })%></td>
                <td><%: item.StartDate %></td>
                <td><%: item.EndDate %></td>
                <td><%: item.Author.Name %></td>   
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
        <div id="fragment-3">
        <table class="tabcontent">
            <thead>
                <tr>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Event"), "OrderEvent", new { id = 1 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Start_Date"), "OrderEvent", new { id = 2 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "End_Date"), "OrderEvent", new { id = 3 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "OrderEvent", new { id = 4 })%></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.psiDept) 
            { %>
            <tr id="eventsPsi">
                <td><%= Html.ActionLink(item.Name, "SingleEvent", new { id = item.EventID })%></td>
                <td><%: item.StartDate %></td>
                <td><%: item.EndDate %></td>
                <td><%: item.Author.Name %></td>   
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
        <div id="fragment-4">
        <table class="tabcontent">
            <thead>
                <tr>
                        <th><%= Html.ActionLink(Lang.GetText("Menu", "Event"), "OrderEvent", new { id = 1 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Start_Date"), "OrderEvent", new { id = 2 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "End_Date"), "OrderEvent", new { id = 3 })%></th>
                    <th><%= Html.ActionLink(Lang.GetText("Menu", "Author"), "OrderEvent", new { id = 4 })%></th>
                </tr>
            </thead>
            <tbody>
            <% foreach (var item in Model.socDept) 
            { %>
            <tr id="eventsSos">
                <td><%= Html.ActionLink(item.Name, "SingleEvent", new { id = item.EventID })%></td>
                <td><%: item.StartDate %></td>
                <td><%: item.EndDate %></td>
                <td><%: item.Author.Name %></td>   
            </tr>
            <% } %>
            </tbody>
            </table>
        </div>
    </div>

</asp:Content>
